package common_enum

// 公共-工程车类型
type commonEnginVehicleType int

var CommonEnginVehicleType commonEnginVehicleType

// A类车
func (c *commonEnginVehicleType) AType() int {
	return 1
}

// B类车
func (c *commonEnginVehicleType) BType() int {
	return 2
}

// C类车
func (c *commonEnginVehicleType) CType() int {
	return 3
}

// D类车
func (c *commonEnginVehicleType) DType() int {
	return 4
}

// E类车
func (c *commonEnginVehicleType) EType() int {
	return 5
}

func (c *commonEnginVehicleType) ToText(value int) string {
	switch value {

	case 1:
		return "A类车"

	case 2:
		return "B类车"

	case 3:
		return "C类车"

	case 4:
		return "D类车"

	case 5:
		return "E类车"

	}
	return ""
}

func (c *commonEnginVehicleType) ToValue(text string) int {
	switch text {

	case "A类车":
		return 1

	case "B类车":
		return 2

	case "C类车":
		return 3

	case "D类车":
		return 4

	case "E类车":
		return 5

	}
	return 0
}
